package com.floreantpos.model.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the STORE table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="STORE"
 */

public abstract class BaseStore  implements Serializable {

	public static String REF = "Store";
	public static String PROP_USER = "User";
	public static String PROP_NAME = "Name";
	public static String PROP_TYPE = "Type";
	public static String PROP_ID = "Id";
	public static String PROP_MODIFIED_TIME = "ModifiedTime";
	public static String PROP_NUMBERS = "Numbers";


	// constructors
	public BaseStore () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseStore (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.util.Date modifiedTime;
	private java.lang.String name;
	private java.lang.Integer numbers;
	private java.lang.String type;

	// many to one
	private com.floreantpos.model.Users user;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="identity"
     *  column="ID"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: MODIFIED_TIME
	 */
	public java.util.Date getModifiedTime () {
			return modifiedTime;
	}

	/**
	 * Set the value related to the column: MODIFIED_TIME
	 * @param modifiedTime the MODIFIED_TIME value
	 */
	public void setModifiedTime (java.util.Date modifiedTime) {
		this.modifiedTime = modifiedTime;
	}



	/**
	 * Return the value associated with the column: NAME
	 */
	public java.lang.String getName () {
			return name;
	}

	/**
	 * Set the value related to the column: NAME
	 * @param name the NAME value
	 */
	public void setName (java.lang.String name) {
		this.name = name;
	}



	/**
	 * Return the value associated with the column: NUMBERS
	 */
	public java.lang.Integer getNumbers () {
			return numbers == null ? Integer.valueOf(0) : numbers;
	}

	/**
	 * Set the value related to the column: NUMBERS
	 * @param numbers the NUMBERS value
	 */
	public void setNumbers (java.lang.Integer numbers) {
		this.numbers = numbers;
	}



	/**
	 * Return the value associated with the column: TYPE
	 */
	public java.lang.String getType () {
			return type;
	}

	/**
	 * Set the value related to the column: TYPE
	 * @param type the TYPE value
	 */
	public void setType (java.lang.String type) {
		this.type = type;
	}



	/**
	 * Return the value associated with the column: USER_ID
	 */
	public com.floreantpos.model.Users getUser () {
			return user;
	}

	/**
	 * Set the value related to the column: USER_ID
	 * @param user the USER_ID value
	 */
	public void setUser (com.floreantpos.model.Users user) {
		this.user = user;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.floreantpos.model.Store)) return false;
		else {
			com.floreantpos.model.Store store = (com.floreantpos.model.Store) obj;
			if (null == this.getId() || null == store.getId()) return false;
			else return (this.getId().equals(store.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}